//
// Created by Lenovo on 2020/10/11.
//

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
#define ll long long
const int maxn = 1e5+10;
ll a[maxn];
int n,m;
ll ans;
void dfs(ll x,int pos,int cnt)
{
    if(x>m) return ;
    if(cnt&1) ans += m/x;
    else ans -= m/x;
    for(int i = pos+1;i<=n;i++) dfs(x*a[i],i,cnt+1);
}
int main()
{

    cin>>n>>m;
    ans = 0;
    for(int i = 1;i<=n;i++) cin>>a[i];
    for(int i = 1;i<=n;i++) dfs(a[i],i,1);
    cout<<ans<<endl;

}